package com.dongyoufa.senior1.month.entity;

import java.util.Date;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

public class Order {
	private String id;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern ="yyyy-MM-dd" )
	private Date orderDate;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern ="yyyy-MM-dd" )
	private Date endorderDate;
	private String name;
	private Double price;
	private String prepared;
	private String type;
	private String add;
	private List<Detail> details;
	
	public Date getEndorderDate() {
		return endorderDate;
	}
	public void setEndorderDate(Date endorderDate) {
		this.endorderDate = endorderDate;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public String getPrepared() {
		return prepared;
	}
	public void setPrepared(String prepared) {
		this.prepared = prepared;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getAdd() {
		return add;
	}
	public void setAdd(String add) {
		this.add = add;
	}
	public List<Detail> getDetails() {
		return details;
	}
	public void setDetails(List<Detail> details) {
		this.details = details;
	}
	public Order(String id, Date orderDate, String name, Double price, String prepared, String type, String add,
			List<Detail> details) {
		super();
		this.id = id;
		this.orderDate = orderDate;
		this.name = name;
		this.price = price;
		this.prepared = prepared;
		this.type = type;
		this.add = add;
		this.details = details;
	}
	public Order() {
		super();
		// TODO Auto-generated constructor stub
	}
	@Override
	public String toString() {
		return "Order [id=" + id + ", orderDate=" + orderDate + ", name=" + name + ", price=" + price + ", prepared="
				+ prepared + ", type=" + type + ", add=" + add + ", details=" + details + "]";
	}
	public Order(String id, Date orderDate, Date endorderDate, String name, Double price, String prepared, String type,
			String add, List<Detail> details) {
		super();
		this.id = id;
		this.orderDate = orderDate;
		this.endorderDate = endorderDate;
		this.name = name;
		this.price = price;
		this.prepared = prepared;
		this.type = type;
		this.add = add;
		this.details = details;
	}
	
}
